<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="root"></div>
    <script src="./js/react.development.js"></script>
    <script src="./js/react-dom.development.js"></script>
    <script src="./js/babel.min.js"></script>
    <!-- script标签上写了type="text/babel".则这个script里面的代码就会被babel解析 -->
    <script type="text/babel">
      // jsx的注意点:
      // 1. 一段jsx必须要有一个根标签
      // 2. 标签的属性,基本和html一致,但是也有写不一样
      // 3. jsx中的注释不是//或/**/. 是{/**/}
      const div = (
        <div>
          <h1 className="one">1</h1>
          <p>2</p>
          {/*<label for=""></label>*/}
        </div>
      )

      ReactDOM.render(div, document.getElementById('root'))
    </script>
  </body>
</html>
